{% extends "product/base.html" %}{% load i18n %} {% block content %}
{% block title %}{% trans "Category Edit title" %}{% endblock %}
<div>
	{% if user and form %}
	<form action="." method="post">
		{% if form.error_dict %}
		<p class="error">
			{% trans "Please correct the errors below." %} {{form.error_dict}}
		</p>
		{% endif %}
		<table>
			<tbody>
				<tr>
					<td>
						{% trans "category name:" %}
					</td>
					<td>
						{{form.name}}
					</td>
					<td>
						{% if form.name.errors %} {{form.name.errors.0}} {% endif %}
					</td>
				</tr>
				<tr>
					<td>
						{% trans "category url:" %}
					</td>
					<td>
						{{form.url}}
					</td>
					<td>
						{% if form.name.errors %} {{form.name.errors.0}} {% endif %}
					</td>
				</tr>
				{% ifnotequal level 1 %}
				<tr>
					<td>
						{% trans "category super category:" %}
					</td>
					<td>
						{{form.category_id}}
					</td>
					<td>
						{% if form.category_id.errors %} {{form.category_id.errors.0}} {% endif %}
					</td>
				</tr>
				{% endifnotequal %}
			</tbody>
		</table>
		<input type="submit" value="{% trans "update" %}" />
	</form>
	{% endif %}
</div>
{% endblock %}
